#travese2.py
class1 = ['zhangsan','lisi','wangwu','zhaoliu']
print('there are {} student in this class:'.format(class1.__len__()))

print('\n下标正向遍历\n')
my_list = range(0,len(class1))
for i in my_list:
    student = class1[i]
    print(student,end=' ')

print('\n下标反向遍历\n')
my_list = range(len(class1)-1,-1,-1)
for i in my_list:
    student = class1[i]
    print(student,end=' ')
    